$(function() {
   // 页面加载我们为msds_table填充内容
	// 构造表格
    $('#msds_table').datagrid({
        url: '/SpringMVCTest/getAllUesr',
        fitColumns :true,
        resizable:true, 
        method: 'post',
        rownumbers: true,
        toolbar: '#msds_param',
        columns:[[      
	        {field:'id',title:'id',width:100, align:'center',
	        		
	        }, 
	        {field:'name',title:'姓名',width:100, align:'center',
	        		
	        },
	        {field:'pwd',title:'密码',width:100, align:'center',
        		
	        },
	        {field:'desca',title:'描述',width:300, align:'center',
        		
	        }
	    ]] ,
        onLoadError: function () {
            showErrorWindow('数据加载失败!');
        }
    });
    $('#msds_table_export_excel_btn').click(
       function(){
    	   window.open("/SpringMVCTest/exportExcel");	
       });
    $('#msds_table_import_excel_btn').click(
    		function(){
        	 $("#window_import").dialog({
				 title: '请选择文件进行上传',   
        		 href:'http://localhost:8080/SpringMVCTest/ajaxhtml/importExcel.jsp',
        		 width: 600,
                 height: 150,
		 	     modal:true,
				 
			 });
        }		
    );
})
   